package com.Poker;

import com.Poker.Group.FourOfKindGroupFilter;
import com.Poker.Group.GroupFilter;
import com.Poker.Group.SameTypeGroupFilter;
import com.Poker.Group.SerialNumberGroupFilter;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by mike on 18/5/23.
 */
public class main {
    public static void main(String[] args) {
        Poker poker1 = new Poker(3, Poker.TYPE_ENUM.黑桃);
        Poker poker2 = new Poker(2, Poker.TYPE_ENUM.黑桃);
        Poker poker3 = new Poker(5, Poker.TYPE_ENUM.黑桃);
        Poker poker4 = new Poker(4, Poker.TYPE_ENUM.黑桃);
        Poker poker5 = new Poker(7, Poker.TYPE_ENUM.黑桃);
        List<Poker> pokers = new ArrayList<>();
        pokers.add(poker1);
        pokers.add(poker2);
        pokers.add(poker3);
        pokers.add(poker4);
        pokers.add(poker5);
        GroupFilter gf = new SameTypeGroupFilter(pokers);
        GroupFilter gf2 = new SerialNumberGroupFilter(pokers);
        GroupFilter gf3 = new FourOfKindGroupFilter(pokers);
        System.out.println(gf.filter());
    }
}
